<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class UserGroupMember extends Model
{
    protected $table = "st_user_group_member";

    protected $fillable = [
        'user_account', 'group_id',
    ];

    /**
     * 获取与用户关联的用户信息
     */
    public function user()
    {


        return $this->hasOne('App\Models\UserBase','account','User_account');
    }

    /**
     * 获取与群组关联关系
     */
    public function group()
    {
        return $this->hasOne('App\Models\UserGroup','id','group_id');
    }
}
